<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.3.0">
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon-next.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32-next.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16-next.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">

<link rel="stylesheet" href="/css/main.css">


<link rel="stylesheet" href="/lib/font-awesome/css/font-awesome.min.css">

<script id="hexo-configurations">
    var NexT = window.NexT || {};
    var CONFIG = {"hostname":"movie0125.gitee.io","root":"/","scheme":"Mist","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":false,"show_result":false,"style":null},"back2top":{"enable":true,"sidebar":false,"scrollpercent":false},"bookmark":{"enable":false,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":null,"storage":true,"lazyload":false,"nav":null},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false},"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
  </script>

  <meta name="description" content="LFS学习笔记（六）继续上一章的步骤，安装基本的系统软件,需要进入 chroot 环境执行。本章的内容同样及其枯燥。由于我的 &#x2F;sources 目录的空间只有20G,基本接近饱和，现在需要清理一下 &#x2F;sources&#x2F;build 目录，执行命令 rm -rf &#x2F;sources&#x2F;build&#x2F;* 删除临时编译文件和目录。">
<meta property="og:type" content="article">
<meta property="og:title" content="lfs-notebook-06">
<meta property="og:url" content="https://movie0125.gitee.io/2021/05/20/lfs-notebook-06/index.html">
<meta property="og:site_name" content="Movie Blog">
<meta property="og:description" content="LFS学习笔记（六）继续上一章的步骤，安装基本的系统软件,需要进入 chroot 环境执行。本章的内容同样及其枯燥。由于我的 &#x2F;sources 目录的空间只有20G,基本接近饱和，现在需要清理一下 &#x2F;sources&#x2F;build 目录，执行命令 rm -rf &#x2F;sources&#x2F;build&#x2F;* 删除临时编译文件和目录。">
<meta property="og:locale" content="zh_CN">
<meta property="article:published_time" content="2021-05-20T07:33:12.000Z">
<meta property="article:modified_time" content="2021-06-09T07:32:40.865Z">
<meta property="article:author" content="Movie">
<meta property="article:tag" content="LFS">
<meta name="twitter:card" content="summary">

<link rel="canonical" href="https://movie0125.gitee.io/2021/05/20/lfs-notebook-06/">


<script id="page-configurations">
  // https://hexo.io/docs/variables.html
  CONFIG.page = {
    sidebar: "",
    isHome : false,
    isPost : true,
    lang   : 'zh-CN'
  };
</script>

  <title>lfs-notebook-06 | Movie Blog</title>
  






  <noscript>
  <style>
  .use-motion .brand,
  .use-motion .menu-item,
  .sidebar-inner,
  .use-motion .post-block,
  .use-motion .pagination,
  .use-motion .comments,
  .use-motion .post-header,
  .use-motion .post-body,
  .use-motion .collection-header { opacity: initial; }

  .use-motion .site-title,
  .use-motion .site-subtitle {
    opacity: initial;
    top: initial;
  }

  .use-motion .logo-line-before i { left: initial; }
  .use-motion .logo-line-after i { right: initial; }
  </style>
</noscript>

</head>

<body itemscope itemtype="http://schema.org/WebPage">
  <div class="container use-motion">
    <div class="headband"></div>

    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏">
      <span class="toggle-line toggle-line-first"></span>
      <span class="toggle-line toggle-line-middle"></span>
      <span class="toggle-line toggle-line-last"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <h1 class="site-title">Movie Blog</h1>
      <span class="logo-line-after"><i></i></span>
    </a>
      <p class="site-subtitle" itemprop="description">拥抱开源，快乐分享</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>




<nav class="site-nav">
  <ul id="menu" class="menu">
        <li class="menu-item menu-item-home">

    <a href="/" rel="section"><i class="fa fa-fw fa-home"></i>首页</a>

  </li>
        <li class="menu-item menu-item-about">

    <a href="/about/" rel="section"><i class="fa fa-fw fa-user"></i>关于</a>

  </li>
        <li class="menu-item menu-item-tags">

    <a href="/tags/" rel="section"><i class="fa fa-fw fa-tags"></i>标签</a>

  </li>
        <li class="menu-item menu-item-categories">

    <a href="/categories/" rel="section"><i class="fa fa-fw fa-th"></i>分类</a>

  </li>
        <li class="menu-item menu-item-archives">

    <a href="/archives/" rel="section"><i class="fa fa-fw fa-archive"></i>归档</a>

  </li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup">
        <div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div id="search-result">
  <div id="no-result">
    <i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
  </div>
</div>

    </div>
  </div>

</div>
    </header>

    
  <div class="back-to-top">
    <i class="fa fa-arrow-up"></i>
    <span>0%</span>
  </div>
  <div class="reading-progress-bar"></div>


    <main class="main">
      <div class="main-inner">
        <div class="content-wrap">
          

          <div class="content post posts-expand">
            

    
  
  
  <article itemscope itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://movie0125.gitee.io/2021/05/20/lfs-notebook-06/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/avatar.gif">
      <meta itemprop="name" content="Movie">
      <meta itemprop="description" content="学习，记录，分享，收获">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="Movie Blog">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          lfs-notebook-06
        </h1>

        <div class="post-meta">
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              <span class="post-meta-item-text">发表于</span>

              <time title="创建时间：2021-05-20 15:33:12" itemprop="dateCreated datePublished" datetime="2021-05-20T15:33:12+08:00">2021-05-20</time>
            </span>
              <span class="post-meta-item">
                <span class="post-meta-item-icon">
                  <i class="fa fa-calendar-check-o"></i>
                </span>
                <span class="post-meta-item-text">更新于</span>
                <time title="修改时间：2021-06-09 15:32:40" itemprop="dateModified" datetime="2021-06-09T15:32:40+08:00">2021-06-09</time>
              </span>
            <span class="post-meta-item">
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/categories/%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0/" itemprop="url" rel="index"><span itemprop="name">学习笔记</span></a>
                </span>
            </span>

          
            <span class="post-meta-item" title="阅读次数" id="busuanzi_container_page_pv" style="display: none;">
              <span class="post-meta-item-icon">
                <i class="fa fa-eye"></i>
              </span>
              <span class="post-meta-item-text">阅读次数：</span>
              <span id="busuanzi_value_page_pv"></span>
            </span>
  
  <span class="post-meta-item">
    
      <span class="post-meta-item-icon">
        <i class="fa fa-comment-o"></i>
      </span>
      <span class="post-meta-item-text">Valine：</span>
    
    <a title="valine" href="/2021/05/20/lfs-notebook-06/#valine-comments" itemprop="discussionUrl">
      <span class="post-comments-count valine-comment-count" data-xid="/2021/05/20/lfs-notebook-06/" itemprop="commentCount"></span>
    </a>
  </span>
  
  

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">

      
        <h1 id="LFS学习笔记（六）"><a href="#LFS学习笔记（六）" class="headerlink" title="LFS学习笔记（六）"></a>LFS学习笔记（六）</h1><p>继续上一章的步骤，安装基本的系统软件,需要进入 <code>chroot</code> 环境执行。本章的内容同样及其枯燥。<br>由于我的 <code>/sources</code> 目录的空间只有20G,基本接近饱和，现在需要清理一下 <code>/sources/build</code> 目录，执行命令 <code>rm -rf /sources/build/*</code> 删除临时编译文件和目录。</p>
<a id="more"></a>

<h2 id="安装-GCC-9-2-0"><a href="#安装-GCC-9-2-0" class="headerlink" title="安装 GCC-9.2.0"></a>安装 GCC-9.2.0</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../gcc-9.2.0.tar.xz</span><br><span class="line"><span class="built_in">cd</span> gcc-9.2.0/</span><br><span class="line"></span><br><span class="line"><span class="keyword">case</span> $(uname -m) <span class="keyword">in</span></span><br><span class="line">  x86_64)</span><br><span class="line">    sed -e <span class="string">&#x27;/m64=/s/lib64/lib/&#x27;</span> \</span><br><span class="line">        -i.orig gcc/config/i386/t-linux64</span><br><span class="line">  ;;</span><br><span class="line"><span class="keyword">esac</span></span><br><span class="line"></span><br><span class="line">mkdir -v build</span><br><span class="line"><span class="built_in">cd</span>       build</span><br><span class="line"></span><br><span class="line">SED=sed                               \</span><br><span class="line">../configure --prefix=/usr            \</span><br><span class="line">             --enable-languages=c,c++ \</span><br><span class="line">             --disable-multilib       \</span><br><span class="line">             --disable-bootstrap      \</span><br><span class="line">             --with-system-zlib</span><br><span class="line"></span><br><span class="line">make</span><br><span class="line"><span class="built_in">ulimit</span> -s 32768</span><br><span class="line">chown -Rv nobody . </span><br><span class="line">su nobody -s /bin/bash -c <span class="string">&quot;PATH=<span class="variable">$PATH</span>:/tools/bin make -k check&quot;</span></span><br><span class="line"></span><br><span class="line">../contrib/test_summary</span><br><span class="line">make install</span><br><span class="line">rm -rf /usr/lib/gcc/$(gcc -dumpmachine)/9.2.0/include-fixed/bits/</span><br><span class="line">chown -v -R root:root \</span><br><span class="line">    /usr/lib/gcc/*linux-gnu/9.2.0/include&#123;,-fixed&#125;</span><br><span class="line">ln -sv ../usr/bin/cpp /lib</span><br><span class="line">ln -sv gcc /usr/bin/cc</span><br><span class="line">install -v -dm755 /usr/lib/bfd-plugins</span><br><span class="line">ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/9.2.0/liblto_plugin.so \</span><br><span class="line">        /usr/lib/bfd-plugins/</span><br><span class="line"></span><br><span class="line"><span class="built_in">echo</span> <span class="string">&#x27;int main()&#123;&#125;&#x27;</span> &gt; dummy.c</span><br><span class="line">cc dummy.c -v -Wl,--verbose &amp;&gt; dummy.log</span><br><span class="line">readelf -l a.out | grep <span class="string">&#x27;: /lib&#x27;</span></span><br><span class="line"></span><br><span class="line">grep -o <span class="string">&#x27;/usr/lib.*/crt[1in].*succeeded&#x27;</span> dummy.log</span><br><span class="line">grep -B4 <span class="string">&#x27;^ /usr/include&#x27;</span> dummy.log</span><br><span class="line">grep <span class="string">&#x27;SEARCH.*/usr/lib&#x27;</span> dummy.log |sed <span class="string">&#x27;s|; |\n|g&#x27;</span></span><br><span class="line">grep <span class="string">&quot;/lib.*/libc.so.6 &quot;</span> dummy.log</span><br><span class="line">grep found dummy.log</span><br><span class="line"></span><br><span class="line">rm -v dummy.c a.out dummy.log</span><br><span class="line">mkdir -pv /usr/share/gdb/auto-load/usr/lib</span><br><span class="line">mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib</span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h2 id="安装-Bzip2-1-0-8"><a href="#安装-Bzip2-1-0-8" class="headerlink" title="安装 Bzip2-1.0.8"></a>安装 Bzip2-1.0.8</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../bzip2-1.0.8.tar.gz</span><br><span class="line"><span class="built_in">cd</span> bzip2-1.0.8/</span><br><span class="line"></span><br><span class="line">patch -Np1 -i ../../bzip2-1.0.8-install_docs-1.patch</span><br><span class="line">sed -i <span class="string">&#x27;s@\(ln -s -f \)$(PREFIX)/bin/@\1@&#x27;</span> Makefile</span><br><span class="line">sed -i <span class="string">&quot;s@(PREFIX)/man@(PREFIX)/share/man@g&quot;</span> Makefile</span><br><span class="line">make -f Makefile-libbz2_so</span><br><span class="line">make clean</span><br><span class="line"></span><br><span class="line">make</span><br><span class="line">make PREFIX=/usr install</span><br><span class="line"></span><br><span class="line"><span class="comment">#安装使用动态链接库的 bzip2 二进制文件到 /bin 目录，创建一些必须的符号链接并清理：</span></span><br><span class="line">cp -v bzip2-shared /bin/bzip2</span><br><span class="line">cp -av libbz2.so* /lib</span><br><span class="line">ln -sv ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so</span><br><span class="line">rm -v /usr/bin/&#123;bunzip2,bzcat,bzip2&#125;</span><br><span class="line">ln -sv bzip2 /bin/bunzip2</span><br><span class="line">ln -sv bzip2 /bin/bzcat</span><br></pre></td></tr></table></figure>
<h2 id="安装-Pkg-config-0-29-2"><a href="#安装-Pkg-config-0-29-2" class="headerlink" title="安装 Pkg-config-0.29.2"></a>安装 Pkg-config-0.29.2</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../pkg-config-0.29.2.tar.gz</span><br><span class="line"><span class="built_in">cd</span> pkg-config-0.29.2/</span><br><span class="line"></span><br><span class="line">./configure --prefix=/usr              \</span><br><span class="line">            --with-internal-glib       \</span><br><span class="line">            --disable-host-tool        \</span><br><span class="line">            --docdir=/usr/share/doc/pkg-config-0.29.2</span><br><span class="line"></span><br><span class="line">make</span><br><span class="line">make check</span><br><span class="line">make install</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Ncurses-6-1"><a href="#安装-Ncurses-6-1" class="headerlink" title="安装 Ncurses-6.1"></a>安装 Ncurses-6.1</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../ncurses-6.1.tar.gz</span><br><span class="line"><span class="built_in">cd</span> ncurses-6.1/</span><br><span class="line"></span><br><span class="line">sed -i <span class="string">&#x27;/LIBTOOL_INSTALL/d&#x27;</span> c++/Makefile.in</span><br><span class="line"></span><br><span class="line">./configure --prefix=/usr           \</span><br><span class="line">            --mandir=/usr/share/man \</span><br><span class="line">            --with-shared           \</span><br><span class="line">            --without-debug         \</span><br><span class="line">            --without-normal        \</span><br><span class="line">            --enable-pc-files       \</span><br><span class="line">            --enable-widec</span><br><span class="line"></span><br><span class="line">make</span><br><span class="line">make install</span><br><span class="line">mv -v /usr/lib/libncursesw.so.6* /lib</span><br><span class="line">ln -sfv ../../lib/$(readlink /usr/lib/libncursesw.so) /usr/lib/libncursesw.so</span><br><span class="line"></span><br><span class="line"><span class="keyword">for</span> lib <span class="keyword">in</span> ncurses form panel menu ; <span class="keyword">do</span></span><br><span class="line">    rm -vf                    /usr/lib/lib<span class="variable">$&#123;lib&#125;</span>.so</span><br><span class="line">    <span class="built_in">echo</span> <span class="string">&quot;INPUT(-l<span class="variable">$&#123;lib&#125;</span>w)&quot;</span> &gt; /usr/lib/lib<span class="variable">$&#123;lib&#125;</span>.so</span><br><span class="line">    ln -sfv <span class="variable">$&#123;lib&#125;</span>w.pc        /usr/lib/pkgconfig/<span class="variable">$&#123;lib&#125;</span>.pc</span><br><span class="line"><span class="keyword">done</span></span><br><span class="line"></span><br><span class="line">rm -vf                     /usr/lib/libcursesw.so</span><br><span class="line"><span class="built_in">echo</span> <span class="string">&quot;INPUT(-lncursesw)&quot;</span> &gt; /usr/lib/libcursesw.so</span><br><span class="line">ln -sfv libncurses.so      /usr/lib/libcurses.so</span><br><span class="line"></span><br><span class="line">mkdir -v       /usr/share/doc/ncurses-6.1</span><br><span class="line">cp -v -R doc/* /usr/share/doc/ncurses-6.1</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Attr-2-4-48"><a href="#安装-Attr-2-4-48" class="headerlink" title="安装 Attr-2.4.48"></a>安装 Attr-2.4.48</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../attr-2.4.48.tar.gz</span><br><span class="line"><span class="built_in">cd</span> attr-2.4.48/</span><br><span class="line"></span><br><span class="line">./configure --prefix=/usr     \</span><br><span class="line">            --disable-static  \</span><br><span class="line">            --sysconfdir=/etc \</span><br><span class="line">            --docdir=/usr/share/doc/attr-2.4.48</span><br><span class="line"></span><br><span class="line">make</span><br><span class="line">make check</span><br><span class="line">make install</span><br><span class="line">mv -v /usr/lib/libattr.so.* /lib</span><br><span class="line">ln -sfv ../../lib/$(readlink /usr/lib/libattr.so) /usr/lib/libattr.so</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Acl-2-2-53"><a href="#安装-Acl-2-2-53" class="headerlink" title="安装 Acl-2.2.53"></a>安装 Acl-2.2.53</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../acl-2.2.53.tar.gz</span><br><span class="line"><span class="built_in">cd</span> acl-2.2.53/</span><br><span class="line"></span><br><span class="line">./configure --prefix=/usr         \</span><br><span class="line">            --disable-static      \</span><br><span class="line">            --libexecdir=/usr/lib \</span><br><span class="line">            --docdir=/usr/share/doc/acl-2.2.53</span><br><span class="line"></span><br><span class="line">make</span><br><span class="line">make install</span><br><span class="line"></span><br><span class="line">mv -v /usr/lib/libacl.so.* /lib</span><br><span class="line">ln -sfv ../../lib/$(readlink /usr/lib/libacl.so) /usr/lib/libacl.so</span><br></pre></td></tr></table></figure>
<h2 id="安装-Libcap-2-27"><a href="#安装-Libcap-2-27" class="headerlink" title="安装 Libcap-2.27"></a>安装 Libcap-2.27</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../libcap-2.27.tar.xz</span><br><span class="line"><span class="built_in">cd</span> libcap-2.27/</span><br><span class="line"></span><br><span class="line">sed -i <span class="string">&#x27;/install.*STALIBNAME/d&#x27;</span> libcap/Makefile</span><br><span class="line"></span><br><span class="line">make</span><br><span class="line">make RAISE_SETFCAP=no lib=lib prefix=/usr install</span><br><span class="line">chmod -v 755 /usr/lib/libcap.so.2.27</span><br><span class="line"></span><br><span class="line">mv -v /usr/lib/libcap.so.* /lib</span><br><span class="line">ln -sfv ../../lib/$(readlink /usr/lib/libcap.so) /usr/lib/libcap.so</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Sed-4-7"><a href="#安装-Sed-4-7" class="headerlink" title="安装 Sed-4.7"></a>安装 Sed-4.7</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../sed-4.7.tar.xz</span><br><span class="line"><span class="built_in">cd</span> sed-4.7</span><br><span class="line"></span><br><span class="line">sed -i <span class="string">&#x27;s/usr/tools/&#x27;</span>                 build-aux/help2man</span><br><span class="line">sed -i <span class="string">&#x27;s/testsuite.panic-tests.sh//&#x27;</span> Makefile.in</span><br><span class="line">./configure --prefix=/usr --bindir=/bin</span><br><span class="line"></span><br><span class="line">make</span><br><span class="line">make html</span><br><span class="line">make check</span><br><span class="line">make install</span><br><span class="line">install -d -m755           /usr/share/doc/sed-4.7</span><br><span class="line">install -m644 doc/sed.html /usr/share/doc/sed-4.7</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Psmisc-23-2"><a href="#安装-Psmisc-23-2" class="headerlink" title="安装 Psmisc-23.2"></a>安装 Psmisc-23.2</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../psmisc-23.2.tar.xz</span><br><span class="line"><span class="built_in">cd</span> psmisc-23.2</span><br><span class="line"></span><br><span class="line">./configure --prefix=/usr</span><br><span class="line">make</span><br><span class="line">make install</span><br><span class="line">mv -v /usr/bin/fuser   /bin</span><br><span class="line">mv -v /usr/bin/killall /bin</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Iana-Etc-2-30"><a href="#安装-Iana-Etc-2-30" class="headerlink" title="安装 Iana-Etc-2.30"></a>安装 Iana-Etc-2.30</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../iana-etc-2.30.tar.bz2</span><br><span class="line"><span class="built_in">cd</span> iana-etc-2.30/</span><br><span class="line"></span><br><span class="line">make</span><br><span class="line">make install</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Bison-3-4-1"><a href="#安装-Bison-3-4-1" class="headerlink" title="安装 Bison-3.4.1"></a>安装 Bison-3.4.1</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../bison-3.4.1.tar.xz</span><br><span class="line"><span class="built_in">cd</span> bison-3.4.1/</span><br><span class="line"></span><br><span class="line">sed -i <span class="string">&#x27;6855 s/mv/cp/&#x27;</span> Makefile.in</span><br><span class="line">./configure --prefix=/usr --docdir=/usr/share/doc/bison-3.4.1</span><br><span class="line">make -j1</span><br><span class="line">make install</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Flex-2-6-4"><a href="#安装-Flex-2-6-4" class="headerlink" title="安装 Flex-2.6.4"></a>安装 Flex-2.6.4</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../flex-2.6.4.tar.gz</span><br><span class="line"><span class="built_in">cd</span> flex-2.6.4/</span><br><span class="line"></span><br><span class="line">sed -i <span class="string">&quot;/math.h/a #include &lt;malloc.h&gt;&quot;</span> src/flexdef.h</span><br><span class="line">HELP2MAN=/tools/bin/<span class="literal">true</span> \</span><br><span class="line">./configure --prefix=/usr --docdir=/usr/share/doc/flex-2.6.4</span><br><span class="line"></span><br><span class="line">make</span><br><span class="line">make check</span><br><span class="line">make install </span><br><span class="line">ln -sv flex /usr/bin/lex</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Grep-3-3"><a href="#安装-Grep-3-3" class="headerlink" title="安装 Grep-3.3"></a>安装 Grep-3.3</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf  ../grep-3.3.tar.xz</span><br><span class="line"><span class="built_in">cd</span> grep-3.3/</span><br><span class="line"></span><br><span class="line">./configure --prefix=/usr --bindir=/bin</span><br><span class="line">make</span><br><span class="line">make -k check </span><br><span class="line">make install </span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Bash-5-0"><a href="#安装-Bash-5-0" class="headerlink" title="安装 Bash-5.0"></a>安装 Bash-5.0</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf  ../bash-5.0.tar.gz</span><br><span class="line"><span class="built_in">cd</span> bash-5.0/</span><br><span class="line"></span><br><span class="line">./configure --prefix=/usr                    \</span><br><span class="line">            --docdir=/usr/share/doc/bash-5.0 \</span><br><span class="line">            --without-bash-malloc            \</span><br><span class="line">            --with-installed-readline</span><br><span class="line">make</span><br><span class="line">chown -Rv nobody .</span><br><span class="line">su nobody -s /bin/bash -c <span class="string">&quot;PATH=<span class="variable">$PATH</span>:/tools/bin HOME=/home make tests&quot;</span></span><br><span class="line"></span><br><span class="line">make install</span><br><span class="line">mv -vf /usr/bin/bash /bin</span><br><span class="line"><span class="built_in">exec</span> /bin/bash --login +h</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Libtool-2-4-6"><a href="#安装-Libtool-2-4-6" class="headerlink" title="安装 Libtool-2.4.6"></a>安装 Libtool-2.4.6</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../libtool-2.4.6.tar.xz  </span><br><span class="line"><span class="built_in">cd</span> libtool-2.4.6</span><br><span class="line"></span><br><span class="line">./configure --prefix=/usr</span><br><span class="line">make</span><br><span class="line">make check</span><br><span class="line">make install</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-GDBM-1-18-1"><a href="#安装-GDBM-1-18-1" class="headerlink" title="安装 GDBM-1.18.1"></a>安装 GDBM-1.18.1</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../gdbm-1.18.1.tar.gz </span><br><span class="line"><span class="built_in">cd</span> gdbm-1.18.1/</span><br><span class="line"></span><br><span class="line">./configure --prefix=/usr    \</span><br><span class="line">            --disable-static \</span><br><span class="line">            --enable-libgdbm-compat</span><br><span class="line">make </span><br><span class="line">make check</span><br><span class="line">make install</span><br></pre></td></tr></table></figure>
<h2 id="安装-Gperf-3-1"><a href="#安装-Gperf-3-1" class="headerlink" title="安装 Gperf-3.1"></a>安装 Gperf-3.1</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../gperf-3.1.tar.gz</span><br><span class="line"><span class="built_in">cd</span> gperf-3.1/</span><br><span class="line"></span><br><span class="line">./configure --prefix=/usr --docdir=/usr/share/doc/gperf-3.1</span><br><span class="line"></span><br><span class="line">make </span><br><span class="line">make -j1 check</span><br><span class="line">make install</span><br></pre></td></tr></table></figure>
<h2 id="安装-Expat-2-2-7"><a href="#安装-Expat-2-2-7" class="headerlink" title="安装 Expat-2.2.7"></a>安装 Expat-2.2.7</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../expat-2.2.7.tar.xz</span><br><span class="line"><span class="built_in">cd</span> expat-2.2.7/</span><br><span class="line"></span><br><span class="line">sed -i <span class="string">&#x27;s|usr/bin/env |bin/|&#x27;</span> run.sh.in</span><br><span class="line">./configure --prefix=/usr    \</span><br><span class="line">            --disable-static \</span><br><span class="line">            --docdir=/usr/share/doc/expat-2.2.7</span><br><span class="line">make</span><br><span class="line">make check</span><br><span class="line">make install </span><br><span class="line">install -v -m644 doc/*.&#123;html,png,css&#125; /usr/share/doc/expat-2.2.7</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Inetutils-1-9-4"><a href="#安装-Inetutils-1-9-4" class="headerlink" title="安装 Inetutils-1.9.4"></a>安装 Inetutils-1.9.4</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../inetutils-1.9.4.tar.xz</span><br><span class="line"><span class="built_in">cd</span> inetutils-1.9.4/</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<p>这里有一个bug，需要修复，创建文件 <code>inetutils-1.9.4-PATH_PROCNET_DEV.patch</code></p>
<figure class="highlight c"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br></pre></td><td class="code"><pre><span class="line">cat &gt; /sources/inetutils<span class="number">-1.9</span><span class="number">.4</span>-PATH_PROCNET_DEV.patch &lt;&lt;<span class="string">&quot;EOF&quot;</span></span><br><span class="line">inetutils: define PATH_PROCNET_DEV <span class="keyword">if</span> <span class="keyword">not</span> already defined</span><br><span class="line"></span><br><span class="line"><span class="keyword">this</span> prevents the following compilation error :</span><br><span class="line">system/linux.c:401:15: error: &#x27;PATH_PROCNET_DEV&#x27; undeclared (first use in this function)</span><br><span class="line"></span><br><span class="line"><span class="keyword">this</span> patch comes from :</span><br><span class="line"> http:<span class="comment">//repository.timesys.com/buildsources/i/inetutils/inetutils-1.9/</span></span><br><span class="line"></span><br><span class="line">Upstream-Status: Inappropriate [<span class="keyword">not</span> author]</span><br><span class="line"></span><br><span class="line">Signed-of-by: Eric Bénard &lt;eric@eukrea.com&gt;</span><br><span class="line">---</span><br><span class="line">diff -Naur inetutils<span class="number">-1.9</span>.orig/ifconfig/system/linux.c inetutils<span class="number">-1.9</span>/ifconfig/system/linux.c</span><br><span class="line">--- inetutils<span class="number">-1.9</span>.orig/ifconfig/system/linux.c  <span class="number">2012</span><span class="number">-01</span><span class="number">-04</span> <span class="number">16</span>:<span class="number">31</span>:<span class="number">36.000000000</span> <span class="number">-0500</span></span><br><span class="line">+++ inetutils<span class="number">-1.9</span>/ifconfig/system/linux.c       <span class="number">2012</span><span class="number">-01</span><span class="number">-04</span> <span class="number">16</span>:<span class="number">40</span>:<span class="number">53.000000000</span> <span class="number">-0500</span></span><br><span class="line">@@ <span class="number">-52</span>,<span class="number">6</span> +<span class="number">52</span>,<span class="number">10</span> @@</span><br><span class="line"> <span class="meta">#<span class="meta-keyword">include</span> <span class="meta-string">&quot;../ifconfig.h&quot;</span></span></span><br><span class="line"> </span><br><span class="line"></span><br><span class="line"> </span><br><span class="line">+<span class="meta">#<span class="meta-keyword">ifndef</span> PATH_PROCNET_DEV</span></span><br><span class="line">+  <span class="meta">#<span class="meta-keyword">define</span> PATH_PROCNET_DEV <span class="meta-string">&quot;/proc/net/dev&quot;</span></span></span><br><span class="line">+<span class="meta">#<span class="meta-keyword">endif</span></span></span><br><span class="line">+</span><br><span class="line"> <span class="comment">/* ARPHRD stuff.  */</span></span><br><span class="line"> </span><br><span class="line"> <span class="keyword">static</span> <span class="keyword">void</span></span><br><span class="line">EOF</span><br></pre></td></tr></table></figure>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line">patch -Np1 -i ../../inetutils-1.9.4-PATH_PROCNET_DEV.patch</span><br><span class="line"></span><br><span class="line">./configure --prefix=/usr        \</span><br><span class="line">            --localstatedir=/var \</span><br><span class="line">            --disable-logger     \</span><br><span class="line">            --disable-whois      \</span><br><span class="line">            --disable-rcp        \</span><br><span class="line">            --disable-rexec      \</span><br><span class="line">            --disable-rlogin     \</span><br><span class="line">            --disable-rsh        \</span><br><span class="line">            --disable-servers</span><br><span class="line">make</span><br><span class="line">make check </span><br><span class="line">make install</span><br><span class="line"></span><br><span class="line">mv -v /usr/bin/&#123;hostname,ping,ping6,traceroute&#125; /bin</span><br><span class="line">mv -v /usr/bin/ifconfig /sbin</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Perl-5-30-0"><a href="#安装-Perl-5-30-0" class="headerlink" title="安装 Perl-5.30.0"></a>安装 Perl-5.30.0</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../perl-5.30.0.tar.xz</span><br><span class="line"><span class="built_in">cd</span> perl-5.30.0/</span><br><span class="line"></span><br><span class="line"><span class="built_in">echo</span> <span class="string">&quot;127.0.0.1 localhost <span class="subst">$(hostname)</span>&quot;</span> &gt; /etc/hosts</span><br><span class="line"><span class="built_in">export</span> BUILD_ZLIB=False</span><br><span class="line"><span class="built_in">export</span> BUILD_BZIP2=0</span><br><span class="line"></span><br><span class="line">sh Configure -des -Dprefix=/usr                 \</span><br><span class="line">                  -Dvendorprefix=/usr           \</span><br><span class="line">                  -Dman1dir=/usr/share/man/man1 \</span><br><span class="line">                  -Dman3dir=/usr/share/man/man3 \</span><br><span class="line">                  -Dpager=<span class="string">&quot;/usr/bin/less -isR&quot;</span>  \</span><br><span class="line">                  -Duseshrplib                  \</span><br><span class="line">                  -Dusethreads</span><br><span class="line">make</span><br><span class="line">make -k <span class="built_in">test</span></span><br><span class="line">make install</span><br><span class="line"><span class="built_in">unset</span> BUILD_ZLIB BUILD_BZIP2</span><br></pre></td></tr></table></figure>
<h2 id="安装-XML-Parser-2-44"><a href="#安装-XML-Parser-2-44" class="headerlink" title="安装 XML::Parser-2.44"></a>安装 XML::Parser-2.44</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../XML-Parser-2.44.tar.gz</span><br><span class="line"><span class="built_in">cd</span> XML-Parser-2.44/</span><br><span class="line"></span><br><span class="line">perl Makefile.PL</span><br><span class="line">make</span><br><span class="line">make <span class="built_in">test</span> </span><br><span class="line">make install</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Intltool-0-51-0"><a href="#安装-Intltool-0-51-0" class="headerlink" title="安装 Intltool-0.51.0"></a>安装 Intltool-0.51.0</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../intltool-0.51.0.tar.gz</span><br><span class="line"><span class="built_in">cd</span> intltool-0.51.0/</span><br><span class="line"></span><br><span class="line">sed -i <span class="string">&#x27;s:\\\$&#123;:\\\$\\&#123;:&#x27;</span> intltool-update.in</span><br><span class="line">./configure --prefix=/usr</span><br><span class="line">make</span><br><span class="line">make check</span><br><span class="line">make install</span><br><span class="line">install -v -Dm644 doc/I18N-HOWTO /usr/share/doc/intltool-0.51.0/I18N-HOWTO</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Autoconf-2-69"><a href="#安装-Autoconf-2-69" class="headerlink" title="安装 Autoconf-2.69"></a>安装 Autoconf-2.69</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../autoconf-2.69.tar.xz</span><br><span class="line"><span class="built_in">cd</span> autoconf-2.69/</span><br><span class="line"></span><br><span class="line">sed <span class="string">&#x27;361 s/&#123;/\\&#123;/&#x27;</span> -i bin/autoscan.in</span><br><span class="line">./configure --prefix=/usr</span><br><span class="line">make</span><br><span class="line">make check</span><br><span class="line">make install</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Automake-1-16-1"><a href="#安装-Automake-1-16-1" class="headerlink" title="安装 Automake-1.16.1"></a>安装 Automake-1.16.1</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../automake-1.16.1.tar.xz</span><br><span class="line"><span class="built_in">cd</span> automake-1.16.1/</span><br><span class="line"></span><br><span class="line">./configure --prefix=/usr --docdir=/usr/share/doc/automake-1.16.1</span><br><span class="line">make</span><br><span class="line">make -j4 check</span><br><span class="line">make install</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Xz-5-2-4"><a href="#安装-Xz-5-2-4" class="headerlink" title="安装 Xz-5.2.4"></a>安装 Xz-5.2.4</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../xz-5.2.4.tar.xz</span><br><span class="line"><span class="built_in">cd</span> xz-5.2.4/</span><br><span class="line"></span><br><span class="line">./configure --prefix=/usr    \</span><br><span class="line">            --disable-static \</span><br><span class="line">            --docdir=/usr/share/doc/xz-5.2.4</span><br><span class="line">make</span><br><span class="line">make check </span><br><span class="line">make install</span><br><span class="line">mv -v   /usr/bin/&#123;lzma,unlzma,lzcat,xz,unxz,xzcat&#125; /bin</span><br><span class="line">mv -v /usr/lib/liblzma.so.* /lib</span><br><span class="line">ln -svf ../../lib/$(readlink /usr/lib/liblzma.so) /usr/lib/liblzma.so</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Kmod-26"><a href="#安装-Kmod-26" class="headerlink" title="安装 Kmod-26"></a>安装 Kmod-26</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../kmod-26.tar.xz</span><br><span class="line"><span class="built_in">cd</span> kmod-26/</span><br><span class="line"></span><br><span class="line">./configure --prefix=/usr          \</span><br><span class="line">            --bindir=/bin          \</span><br><span class="line">            --sysconfdir=/etc      \</span><br><span class="line">            --with-rootlibdir=/lib \</span><br><span class="line">            --with-xz              \</span><br><span class="line">            --with-zlib</span><br><span class="line">make</span><br><span class="line">make install</span><br><span class="line"></span><br><span class="line"><span class="keyword">for</span> target <span class="keyword">in</span> depmod insmod lsmod modinfo modprobe rmmod; <span class="keyword">do</span></span><br><span class="line">  ln -sfv ../bin/kmod /sbin/<span class="variable">$target</span></span><br><span class="line"><span class="keyword">done</span></span><br><span class="line"></span><br><span class="line">ln -sfv kmod /bin/lsmod</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Gettext-0-20-1"><a href="#安装-Gettext-0-20-1" class="headerlink" title="安装 Gettext-0.20.1"></a>安装 Gettext-0.20.1</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../gettext-0.20.1.tar.xz</span><br><span class="line"><span class="built_in">cd</span> gettext-0.20.1/</span><br><span class="line"></span><br><span class="line">./configure --prefix=/usr    \</span><br><span class="line">            --disable-static \</span><br><span class="line">            --docdir=/usr/share/doc/gettext-0.20.1</span><br><span class="line">make </span><br><span class="line">make check </span><br><span class="line">make install</span><br><span class="line">chmod -v 0755 /usr/lib/preloadable_libintl.so</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Libelf"><a href="#安装-Libelf" class="headerlink" title="安装 Libelf"></a>安装 Libelf</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../elfutils-0.177.tar.bz2</span><br><span class="line"><span class="built_in">cd</span> elfutils-0.177/</span><br><span class="line"></span><br><span class="line">./configure --prefix=/usr</span><br><span class="line">make</span><br><span class="line">make check </span><br><span class="line">make -C libelf install</span><br><span class="line">install -vm644 config/libelf.pc /usr/lib/pkgconfig</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Libffi-3-2-1"><a href="#安装-Libffi-3-2-1" class="headerlink" title="安装 Libffi-3.2.1"></a>安装 Libffi-3.2.1</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../libffi-3.2.1.tar.gz</span><br><span class="line"><span class="built_in">cd</span> libffi-3.2.1/</span><br><span class="line"></span><br><span class="line">sed -e <span class="string">&#x27;/^includesdir/ s/$(libdir).*$/$(includedir)/&#x27;</span> \</span><br><span class="line">    -i include/Makefile.in</span><br><span class="line"></span><br><span class="line">sed -e <span class="string">&#x27;/^includedir/ s/=.*$/=@includedir@/&#x27;</span> \</span><br><span class="line">    -e <span class="string">&#x27;s/^Cflags: -I$&#123;includedir&#125;/Cflags:/&#x27;</span> \</span><br><span class="line">    -i libffi.pc.in</span><br><span class="line">./configure --prefix=/usr --disable-static --with-gcc-arch=native</span><br><span class="line"></span><br><span class="line">make</span><br><span class="line">make check</span><br><span class="line">make install </span><br><span class="line"></span><br></pre></td></tr></table></figure>

<h2 id="安装-OpenSSL-1-1-1c"><a href="#安装-OpenSSL-1-1-1c" class="headerlink" title="安装 OpenSSL-1.1.1c"></a>安装 OpenSSL-1.1.1c</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../openssl-1.1.1c.tar.gz</span><br><span class="line"><span class="built_in">cd</span> openssl-1.1.1c/</span><br><span class="line"></span><br><span class="line">sed -i <span class="string">&#x27;/\&#125; data/s/ =.*$/;\n    memset(\&amp;data, 0, sizeof(data));/&#x27;</span> \</span><br><span class="line">  crypto/rand/rand_lib.c</span><br><span class="line">./config --prefix=/usr         \</span><br><span class="line">         --openssldir=/etc/ssl \</span><br><span class="line">         --libdir=lib          \</span><br><span class="line">         shared                \</span><br><span class="line">         zlib-dynamic</span><br><span class="line"></span><br><span class="line">make</span><br><span class="line">make <span class="built_in">test</span> </span><br><span class="line">sed -i <span class="string">&#x27;/INSTALL_LIBS/s/libcrypto.a libssl.a//&#x27;</span> Makefile</span><br><span class="line">make MANSUFFIX=ssl install</span><br><span class="line">mv -v /usr/share/doc/openssl /usr/share/doc/openssl-1.1.1c</span><br><span class="line">cp -vfr doc/* /usr/share/doc/openssl-1.1.1c</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Python-3-7-4"><a href="#安装-Python-3-7-4" class="headerlink" title="安装 Python-3.7.4"></a>安装 Python-3.7.4</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../Python-3.7.4.tar.xz</span><br><span class="line"><span class="built_in">cd</span> Python-3.7.4/</span><br><span class="line"></span><br><span class="line">./configure --prefix=/usr       \</span><br><span class="line">            --enable-shared     \</span><br><span class="line">            --with-system-expat \</span><br><span class="line">            --with-system-ffi   \</span><br><span class="line">            --with-ensurepip=yes</span><br><span class="line">make</span><br><span class="line"></span><br><span class="line">make install</span><br><span class="line">chmod -v 755 /usr/lib/libpython3.7m.so</span><br><span class="line">chmod -v 755 /usr/lib/libpython3.so</span><br><span class="line">ln -sfv pip3.7 /usr/bin/pip3</span><br><span class="line"></span><br><span class="line">install -v -dm755 /usr/share/doc/python-3.7.4/html </span><br><span class="line"></span><br><span class="line">tar --strip-components=1  \</span><br><span class="line">    --no-same-owner       \</span><br><span class="line">    --no-same-permissions \</span><br><span class="line">    -C /usr/share/doc/python-3.7.4/html \</span><br><span class="line">    -xvf ../python-3.7.4-docs-html.tar.bz2</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Ninja-1-9-0"><a href="#安装-Ninja-1-9-0" class="headerlink" title="安装 Ninja-1.9.0"></a>安装 Ninja-1.9.0</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../ninja-1.9.0.tar.gz</span><br><span class="line"><span class="built_in">cd</span> ninja-1.9.0/</span><br><span class="line"></span><br><span class="line"><span class="built_in">export</span> NINJAJOBS=4</span><br><span class="line">sed -i <span class="string">&#x27;/int Guess/a \</span></span><br><span class="line"><span class="string">  int   j = 0;\</span></span><br><span class="line"><span class="string">  char* jobs = getenv( &quot;NINJAJOBS&quot; );\</span></span><br><span class="line"><span class="string">  if ( jobs != NULL ) j = atoi( jobs );\</span></span><br><span class="line"><span class="string">  if ( j &gt; 0 ) return j;\</span></span><br><span class="line"><span class="string">&#x27;</span> src/ninja.cc</span><br><span class="line">python3 configure.py --bootstrap</span><br><span class="line">./ninja ninja_test</span><br><span class="line">./ninja_test --gtest_filter=-SubprocessTest.SetWithLots</span><br><span class="line"></span><br><span class="line">install -vm755 ninja /usr/bin/</span><br><span class="line">install -vDm644 misc/bash-completion /usr/share/bash-completion/completions/ninja</span><br><span class="line">install -vDm644 misc/zsh-completion  /usr/share/zsh/site-functions/_ninja</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Meson-0-51-1"><a href="#安装-Meson-0-51-1" class="headerlink" title="安装 Meson-0.51.1"></a>安装 Meson-0.51.1</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../meson-0.51.1.tar.gz</span><br><span class="line"><span class="built_in">cd</span> meson-0.51.1/</span><br><span class="line"></span><br><span class="line">python3 setup.py build</span><br><span class="line">python3 setup.py install --root=dest</span><br><span class="line">cp -rv dest/* /</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Coreutils-8-31"><a href="#安装-Coreutils-8-31" class="headerlink" title="安装 Coreutils-8.31"></a>安装 Coreutils-8.31</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../coreutils-8.31.tar.xz</span><br><span class="line"><span class="built_in">cd</span> coreutils-8.31/</span><br><span class="line"></span><br><span class="line">patch -Np1 -i ../../coreutils-8.31-i18n-1.patch</span><br><span class="line">sed -i <span class="string">&#x27;/test.lock/s/^/#/&#x27;</span> gnulib-tests/gnulib.mk</span><br><span class="line">autoreconf -fiv</span><br><span class="line">FORCE_UNSAFE_CONFIGURE=1 ./configure \</span><br><span class="line">            --prefix=/usr            \</span><br><span class="line">            --enable-no-install-program=<span class="built_in">kill</span>,uptime</span><br><span class="line"></span><br><span class="line">make</span><br><span class="line">make NON_ROOT_USERNAME=nobody check-root</span><br><span class="line"><span class="built_in">echo</span> <span class="string">&quot;dummy:x:1000:nobody&quot;</span> &gt;&gt; /etc/group</span><br><span class="line">chown -Rv nobody . </span><br><span class="line">su nobody -s /bin/bash \</span><br><span class="line">          -c <span class="string">&quot;PATH=<span class="variable">$PATH</span>:/tools/bin make RUN_EXPENSIVE_TESTS=yes check&quot;</span></span><br><span class="line">sed -i <span class="string">&#x27;/dummy/d&#x27;</span> /etc/group</span><br><span class="line"></span><br><span class="line">make install</span><br><span class="line">mv -v /usr/bin/&#123;cat,chgrp,chmod,chown,cp,date,dd,df,<span class="built_in">echo</span>&#125; /bin</span><br><span class="line">mv -v /usr/bin/&#123;<span class="literal">false</span>,ln,ls,mkdir,mknod,mv,<span class="built_in">pwd</span>,rm&#125; /bin</span><br><span class="line">mv -v /usr/bin/&#123;rmdir,stty,sync,<span class="literal">true</span>,uname&#125; /bin</span><br><span class="line">mv -v /usr/bin/chroot /usr/sbin</span><br><span class="line">mv -v /usr/share/man/man1/chroot.1 /usr/share/man/man8/chroot.8</span><br><span class="line">sed -i s/\&quot;1\&quot;/\&quot;8\&quot;/1 /usr/share/man/man8/chroot.8</span><br><span class="line">mv -v /usr/bin/&#123;head,nice,sleep,touch&#125; /bin</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Check-0-12-0"><a href="#安装-Check-0-12-0" class="headerlink" title="安装 Check-0.12.0"></a>安装 Check-0.12.0</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../check-0.12.0.tar.gz</span><br><span class="line"><span class="built_in">cd</span> check-0.12.0/</span><br><span class="line"></span><br><span class="line">./configure --prefix=/usr</span><br><span class="line">make</span><br><span class="line">make check </span><br><span class="line">make docdir=/usr/share/doc/check-0.12.0 install</span><br><span class="line">sed -i <span class="string">&#x27;1 s/tools/usr/&#x27;</span> /usr/bin/checkmk</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Diffutils-3-7"><a href="#安装-Diffutils-3-7" class="headerlink" title="安装 Diffutils-3.7"></a>安装 Diffutils-3.7</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../diffutils-3.7.tar.xz</span><br><span class="line"><span class="built_in">cd</span> diffutils-3.7/</span><br><span class="line"></span><br><span class="line">./configure --prefix=/usr</span><br><span class="line">make</span><br><span class="line">make check</span><br><span class="line">make install</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Gawk-5-0-1"><a href="#安装-Gawk-5-0-1" class="headerlink" title="安装 Gawk-5.0.1"></a>安装 Gawk-5.0.1</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../gawk-5.0.1.tar.xz</span><br><span class="line"><span class="built_in">cd</span> gawk-5.0.1/</span><br><span class="line"></span><br><span class="line">sed -i <span class="string">&#x27;s/extras//&#x27;</span> Makefile.in</span><br><span class="line">./configure --prefix=/usr</span><br><span class="line"></span><br><span class="line">make</span><br><span class="line">make check</span><br><span class="line">make install</span><br><span class="line"></span><br><span class="line">mkdir -v /usr/share/doc/gawk-5.0.1</span><br><span class="line">cp    -v doc/&#123;awkforai.txt,*.&#123;eps,pdf,jpg&#125;&#125; /usr/share/doc/gawk-5.0.1</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Findutils-4-6-0"><a href="#安装-Findutils-4-6-0" class="headerlink" title="安装 Findutils-4.6.0"></a>安装 Findutils-4.6.0</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../findutils-4.6.0.tar.gz</span><br><span class="line"><span class="built_in">cd</span> findutils-4.6.0/</span><br><span class="line"></span><br><span class="line">sed -i <span class="string">&#x27;s/test-lock..EXEEXT.//&#x27;</span> tests/Makefile.in</span><br><span class="line">sed -i <span class="string">&#x27;s/IO_ftrylockfile/IO_EOF_SEEN/&#x27;</span> gl/lib/*.c</span><br><span class="line">sed -i <span class="string">&#x27;/unistd/a #include &lt;sys/sysmacros.h&gt;&#x27;</span> gl/lib/mountlist.c</span><br><span class="line"><span class="built_in">echo</span> <span class="string">&quot;#define _IO_IN_BACKUP 0x100&quot;</span> &gt;&gt; gl/lib/stdio-impl.h</span><br><span class="line"></span><br><span class="line">./configure --prefix=/usr --localstatedir=/var/lib/locate</span><br><span class="line">make</span><br><span class="line">make check</span><br><span class="line">make install</span><br><span class="line"></span><br><span class="line">mv -v /usr/bin/find /bin</span><br><span class="line">sed -i <span class="string">&#x27;s|find:=$&#123;BINDIR&#125;|find:=/bin|&#x27;</span> /usr/bin/updatedb</span><br><span class="line"></span><br></pre></td></tr></table></figure>
<h2 id="安装-Groff-1-22-4"><a href="#安装-Groff-1-22-4" class="headerlink" title="安装 Groff-1.22.4"></a>安装 Groff-1.22.4</h2><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line"><span class="built_in">cd</span> /sources/build</span><br><span class="line">tar xf ../groff-1.22.4.tar.gz</span><br><span class="line"><span class="built_in">cd</span> groff-1.22.4/</span><br><span class="line"></span><br><span class="line">PAGE=A4 ./configure --prefix=/usr</span><br><span class="line">make -j1</span><br><span class="line">make install</span><br><span class="line"></span><br></pre></td></tr></table></figure>
    </div>

    
    
    

      <footer class="post-footer">
          <div class="post-tags">
              <a href="/tags/LFS/" rel="tag"># LFS</a>
          </div>

        


        
    <div class="post-nav">
      <div class="post-nav-item">
    <a href="/2021/05/19/lfs-notebook-05/" rel="prev" title="lfs-notebook-05">
      <i class="fa fa-chevron-left"></i> lfs-notebook-05
    </a></div>
      <div class="post-nav-item">
    <a href="/2021/06/09/lfs-notebook-07/" rel="next" title="lfs-notebook-07">
      lfs-notebook-07 <i class="fa fa-chevron-right"></i>
    </a></div>
    </div>
      </footer>
    
  </article>
  
  
  



          </div>
          
    <div class="comments" id="valine-comments"></div>

<script>
  window.addEventListener('tabs:register', () => {
    let { activeClass } = CONFIG.comments;
    if (CONFIG.comments.storage) {
      activeClass = localStorage.getItem('comments_active') || activeClass;
    }
    if (activeClass) {
      let activeTab = document.querySelector(`a[href="#comment-${activeClass}"]`);
      if (activeTab) {
        activeTab.click();
      }
    }
  });
  if (CONFIG.comments.storage) {
    window.addEventListener('tabs:click', event => {
      if (!event.target.matches('.tabs-comment .tab-content .tab-pane')) return;
      let commentClass = event.target.classList[1];
      localStorage.setItem('comments_active', commentClass);
    });
  }
</script>

        </div>
          
  
  <div class="toggle sidebar-toggle">
    <span class="toggle-line toggle-line-first"></span>
    <span class="toggle-line toggle-line-middle"></span>
    <span class="toggle-line toggle-line-last"></span>
  </div>

  <aside class="sidebar">
    <div class="sidebar-inner">

      <ul class="sidebar-nav motion-element">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <!--noindex-->
      <div class="post-toc-wrap sidebar-panel">
          <div class="post-toc motion-element"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#LFS%E5%AD%A6%E4%B9%A0%E7%AC%94%E8%AE%B0%EF%BC%88%E5%85%AD%EF%BC%89"><span class="nav-number">1.</span> <span class="nav-text">LFS学习笔记（六）</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-GCC-9-2-0"><span class="nav-number">1.1.</span> <span class="nav-text">安装 GCC-9.2.0</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Bzip2-1-0-8"><span class="nav-number">1.2.</span> <span class="nav-text">安装 Bzip2-1.0.8</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Pkg-config-0-29-2"><span class="nav-number">1.3.</span> <span class="nav-text">安装 Pkg-config-0.29.2</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Ncurses-6-1"><span class="nav-number">1.4.</span> <span class="nav-text">安装 Ncurses-6.1</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Attr-2-4-48"><span class="nav-number">1.5.</span> <span class="nav-text">安装 Attr-2.4.48</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Acl-2-2-53"><span class="nav-number">1.6.</span> <span class="nav-text">安装 Acl-2.2.53</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Libcap-2-27"><span class="nav-number">1.7.</span> <span class="nav-text">安装 Libcap-2.27</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Sed-4-7"><span class="nav-number">1.8.</span> <span class="nav-text">安装 Sed-4.7</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Psmisc-23-2"><span class="nav-number">1.9.</span> <span class="nav-text">安装 Psmisc-23.2</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Iana-Etc-2-30"><span class="nav-number">1.10.</span> <span class="nav-text">安装 Iana-Etc-2.30</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Bison-3-4-1"><span class="nav-number">1.11.</span> <span class="nav-text">安装 Bison-3.4.1</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Flex-2-6-4"><span class="nav-number">1.12.</span> <span class="nav-text">安装 Flex-2.6.4</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Grep-3-3"><span class="nav-number">1.13.</span> <span class="nav-text">安装 Grep-3.3</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Bash-5-0"><span class="nav-number">1.14.</span> <span class="nav-text">安装 Bash-5.0</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Libtool-2-4-6"><span class="nav-number">1.15.</span> <span class="nav-text">安装 Libtool-2.4.6</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-GDBM-1-18-1"><span class="nav-number">1.16.</span> <span class="nav-text">安装 GDBM-1.18.1</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Gperf-3-1"><span class="nav-number">1.17.</span> <span class="nav-text">安装 Gperf-3.1</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Expat-2-2-7"><span class="nav-number">1.18.</span> <span class="nav-text">安装 Expat-2.2.7</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Inetutils-1-9-4"><span class="nav-number">1.19.</span> <span class="nav-text">安装 Inetutils-1.9.4</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Perl-5-30-0"><span class="nav-number">1.20.</span> <span class="nav-text">安装 Perl-5.30.0</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-XML-Parser-2-44"><span class="nav-number">1.21.</span> <span class="nav-text">安装 XML::Parser-2.44</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Intltool-0-51-0"><span class="nav-number">1.22.</span> <span class="nav-text">安装 Intltool-0.51.0</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Autoconf-2-69"><span class="nav-number">1.23.</span> <span class="nav-text">安装 Autoconf-2.69</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Automake-1-16-1"><span class="nav-number">1.24.</span> <span class="nav-text">安装 Automake-1.16.1</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Xz-5-2-4"><span class="nav-number">1.25.</span> <span class="nav-text">安装 Xz-5.2.4</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Kmod-26"><span class="nav-number">1.26.</span> <span class="nav-text">安装 Kmod-26</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Gettext-0-20-1"><span class="nav-number">1.27.</span> <span class="nav-text">安装 Gettext-0.20.1</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Libelf"><span class="nav-number">1.28.</span> <span class="nav-text">安装 Libelf</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Libffi-3-2-1"><span class="nav-number">1.29.</span> <span class="nav-text">安装 Libffi-3.2.1</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-OpenSSL-1-1-1c"><span class="nav-number">1.30.</span> <span class="nav-text">安装 OpenSSL-1.1.1c</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Python-3-7-4"><span class="nav-number">1.31.</span> <span class="nav-text">安装 Python-3.7.4</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Ninja-1-9-0"><span class="nav-number">1.32.</span> <span class="nav-text">安装 Ninja-1.9.0</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Meson-0-51-1"><span class="nav-number">1.33.</span> <span class="nav-text">安装 Meson-0.51.1</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Coreutils-8-31"><span class="nav-number">1.34.</span> <span class="nav-text">安装 Coreutils-8.31</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Check-0-12-0"><span class="nav-number">1.35.</span> <span class="nav-text">安装 Check-0.12.0</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Diffutils-3-7"><span class="nav-number">1.36.</span> <span class="nav-text">安装 Diffutils-3.7</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Gawk-5-0-1"><span class="nav-number">1.37.</span> <span class="nav-text">安装 Gawk-5.0.1</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Findutils-4-6-0"><span class="nav-number">1.38.</span> <span class="nav-text">安装 Findutils-4.6.0</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%AE%89%E8%A3%85-Groff-1-22-4"><span class="nav-number">1.39.</span> <span class="nav-text">安装 Groff-1.22.4</span></a></li></ol></li></ol></div>
      </div>
      <!--/noindex-->

      <div class="site-overview-wrap sidebar-panel">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
  <p class="site-author-name" itemprop="name">Movie</p>
  <div class="site-description" itemprop="description">学习，记录，分享，收获</div>
</div>
<div class="site-state-wrap motion-element">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
          <a href="/archives/">
        
          <span class="site-state-item-count">14</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
            <a href="/categories/">
          
        <span class="site-state-item-count">3</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
            <a href="/tags/">
          
        <span class="site-state-item-count">7</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>



      </div>

    </div>
  </aside>
  <div id="sidebar-dimmer"></div>


      </div>
    </main>

    <footer class="footer">
      <div class="footer-inner">
        

        

<div class="copyright">
  
  &copy; 
  <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Movie</span>
</div>

        
<div class="busuanzi-count">
  <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
    <span class="post-meta-item" id="busuanzi_container_site_uv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-user"></i>
      </span>
      <span class="site-uv" title="总访客量">
        <span id="busuanzi_value_site_uv"></span>
      </span>
    </span>
    <span class="post-meta-divider">|</span>
    <span class="post-meta-item" id="busuanzi_container_site_pv" style="display: none;">
      <span class="post-meta-item-icon">
        <i class="fa fa-eye"></i>
      </span>
      <span class="site-pv" title="总访问量">
        <span id="busuanzi_value_site_pv"></span>
      </span>
    </span>
</div>








      </div>
    </footer>
  </div>

  
  <script src="/lib/anime.min.js"></script>
  <script src="/lib/velocity/velocity.min.js"></script>
  <script src="/lib/velocity/velocity.ui.min.js"></script>

<script src="/js/utils.js"></script>

<script src="/js/motion.js"></script>


<script src="/js/schemes/muse.js"></script>


<script src="/js/next-boot.js"></script>




  




  
<script src="/js/local-search.js"></script>











<script>
if (document.querySelectorAll('pre.mermaid').length) {
  NexT.utils.getScript('//cdn.jsdelivr.net/npm/mermaid@8/dist/mermaid.min.js', () => {
    mermaid.initialize({
      theme    : 'forest',
      logLevel : 3,
      flowchart: { curve     : 'linear' },
      gantt    : { axisFormat: '%m/%d/%Y' },
      sequence : { actorMargin: 50 }
    });
  }, window.mermaid);
}
</script>


  

  


<script>
NexT.utils.loadComments(document.querySelector('#valine-comments'), () => {
  NexT.utils.getScript('//unpkg.com/valine/dist/Valine.min.js', () => {
    var GUEST = ['nick', 'mail', 'link'];
    var guest = 'nick,mail,link';
    guest = guest.split(',').filter(item => {
      return GUEST.includes(item);
    });
    new Valine({
      el         : '#valine-comments',
      verify     : false,
      notify     : false,
      appId      : 'bx3R5BB7VYCe0Yu5f4PF2Ako-gzGzoHsz',
      appKey     : '24eOkgM1v8hYTlnAO3C2eG3n',
      placeholder: "欢迎留言评论",
      avatar     : 'mm',
      meta       : guest,
      pageSize   : '10' || 10,
      visitor    : false,
      lang       : 'zh-cn' || 'zh-cn',
      path       : location.pathname,
      recordIP   : false,
      serverURLs : ''
    });
  }, window.Valine);
});
</script>

</body>
</html>
